<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">


<ui:composition template="/template.xhtml">
	<ui:define name="tituloPagina">
		<p:outputLabel value="#{msgs['paginas.consulta.reunioes']}" />
	</ui:define>
	
	<ui:define name="botoes">
		<p:commandButton value="Novo" ajax="false" action="#{reuniaoBean.novo}"  styleClass="botaoNovo" />
		
		<p:panelGrid columns="3" style="margin-left:-199px; margin-top: 10px;">
			<p:outputLabel value="Nome: "/>
			
			<p:autoComplete value="#{reuniaoBean.nomeReuniaoSelecionada}"
				completeMethod="#{reuniaoBean.complete}" queryDelay="700"></p:autoComplete>
			
			<p:commandButton icon="ui-icon-search" action="#{reuniaoBean.listarByFiltros}"
				 ajax="false" title="Pesquisar">			
			</p:commandButton>
			
		</p:panelGrid>	
		
	</ui:define>
	
	
	
	<ui:define name="principal">
			
		<p:dataTable value="#{reuniaoBean.listaReuniao}" var="_lista"
			paginator="true" rows="10">
			<p:column headerText="Data Reuniao">
				<p:outputLabel value="#{_lista.dataReuniao}">
					<f:convertDateTime pattern="dd/MM/yyyy hh:mm" timeZone="GMT-03:00" />
				</p:outputLabel>
			</p:column>
			<p:column headerText="Nome"
				style="white-space:normal !important;">
				<p:outputLabel value="#{_lista.nome}" />
			</p:column>
			<p:column headerText="Ações">
				<p:commandButton icon="ui-icon-pencil"
					action="#{reuniaoBean.editar}" title="Editar Reuniao">
					<f:setPropertyActionListener target="#{reuniaoBean.reuniao}"
						value="#{_lista}" />
				</p:commandButton>
				<p:commandButton icon="ui-icon-close" title="Excluir Reuniao"
					action="#{reuniaoBean.excluir}" ajax="false">
					<f:setPropertyActionListener target="#{reuniaoBean.reuniao}"
						value="#{_lista}" />
				</p:commandButton>
			</p:column>
		</p:dataTable>
	</ui:define>
</ui:composition>
</html>